﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CapaDeDominio.Servicio>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Creacion
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Creacion</h2>

    <% if (TempData["MensajeRegistro"] != null)
       { %>
        <p>
            <%= TempData["MensajeRegistro"] %>
        </p>
    <%}
       else
       { %>
       <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm("Create", "Servicio", FormMethod.Post)) {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Fields</legend>
            
            <%--<div class="editor-label">
                <%: Html.LabelFor(model => model.Codigo) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Codigo) %>
                <%: Html.ValidationMessageFor(model => model.Codigo) %>
            </div>--%>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Nombre) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Nombre)%>
                <%: Html.ValidationMessageFor(model => model.Nombre)%>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.Descripcion) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Descripcion)%>
                <%: Html.ValidationMessageFor(model => model.Descripcion)%>
            </div>
            
            
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Alquiler) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Alquiler)%>
                <%: Html.ValidationMessageFor(model => model.Alquiler)%>
            </div>
            
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>
    <%} %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

